/*
 * Wire
 * Copyright (C) 2018 Wire Swiss GmbH
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see http://www.gnu.org/licenses/.
 *
 */

.panel-participant {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 20px;

  &__head {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: center;
    padding: 0 16px;

    &__verified-icon {
      display: block;
      height: 16px;
      margin-left: 8px;
      text-align: center;
    }

    &__name {
      display: block;
      overflow: hidden;
      min-height: 24px;
      flex-shrink: 1;
      justify-content: center;
      padding: 0;
      border: none;
      margin: 0;
      .heading-h2;
      text-align: center;
      word-break: break-word;
    }
  }

  &__user-name {
    .ellipsis;
    padding: 0 16px;
  }

  &__user-name,
  &__provider-name {
    width: 100%;
    margin: 8px 0 0;
    font-size: var(--font-size-small);
    font-weight: var(--font-weight-regular);
    text-align: center;
    white-space: pre;
  }

  &__avatar,
  participant-avatar {
    margin: 20px auto;
  }

  &__label {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-xsmall);
    font-weight: var(--font-weight-bold);
    text-transform: uppercase;
    &:not(:last-of-type) {
      margin-bottom: 8px;
    }

    path {
      fill: var(--background);
    }

    svg {
      max-width: 14px;
      max-height: 14px;
    }

    span {
      margin-left: 4px;
    }

    &--external svg {
      max-width: 16px;
      max-height: 16px;
    }
  }

  &__guest-expiration {
    display: flex;
    justify-content: center;
    margin-top: 8px;
    color: var(--background-fade-56);
    font-size: var(--font-size-small);
    font-weight: var(--font-weight-bold);
  }

  &__availability {
    justify-content: center;
    font-size: var(--font-size-xsmall);
    font-weight: var(--font-weight-bold);
    text-transform: uppercase;
  }

  &__guest-label,
  &__guest-expiration,
  &__availability > div {
    margin-bottom: 16px;
  }

  &__service-description {
    font-size: var(--font-size-medium);
    font-weight: var(--font-weight-regular);
  }

  &__role-label {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 100px;
    margin-bottom: 14px;
    background-color: var(--background);
    color: var(--app-bg);
    font-size: var(--font-size-small);
    font-weight: var(--font-weight-bold);
    text-transform: uppercase;
  }
}
